<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/jeecms_sys/head.html"/>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});

function getTableForm() {
	return document.getElementById('jvForm');
}

function xiafa(){
	//var id=document.getElementById("couponId").value;
	if(Pn.checkedCount('userIds')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	var f = getTableForm();
	f.action="o_xf_coupon_user.do";
	f.submit();
	//window.location.href="o_xfCoupon.do?id="+id+"&userId="+userId;
};
</script>
</head>
<body>
<div class="body-box">
<form action="v_xf_user.do" method="post" style="padding-top:5px;">
<div>
<@p.hidden id="couponId_query" name="couponId" value=coupon.id/>
用户名称：<input type="text" name="userName" value="${name!}" style="width:100px"/>
手机号 ：<input type="text" name="mobile" value="${mobile!}" style="width:100px"/>
<input class="query" type="submit" value="<@s.m "global.query"/>"/>
<input class="add" type="button" value="下发" onclick="javascript:xiafa();"/>
</div>
</form>

<@p.form id="jvForm" action="o_xf_coupon_user.do" labelWidth="12">
<@p.td colspan="1">
<@p.hidden id="couponId" name="id" value=coupon.id/>

<@p.table value=pagination;userAccount,i,has_next><#rt/>
	<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"userIds\",this.checked)'/>" width="20">
		<input type='checkbox' name='userIds' value='${(userAccount.user.id)!}'/><#t/>
	</@p.column><#t/>
	<@p.column code="shopInfo.shopName">${userAccount.shop.shopName!}</@p.column><#t/>
	<@p.column code="用户姓名">${userAccount.user.name!}</@p.column><#t/>
	<@p.column code="手机号">${userAccount.user.mobile!}</@p.column><#t/>
</@p.table>
</@p.td><@p.tr/>
</@p.form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>